package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchIndexMapper;
import com.ruoyi.system.domain.DispatchIndex;
import com.ruoyi.system.service.IDispatchIndexService;

/**
 * 调度首页信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchIndexServiceImpl implements IDispatchIndexService 
{
    @Autowired
    private DispatchIndexMapper dispatchIndexMapper;

    /**
     * 查询调度首页信息
     * 
     * @param dispatchIndexId 调度首页信息主键
     * @return 调度首页信息
     */
    @Override
    public DispatchIndex selectDispatchIndexByDispatchIndexId(Long dispatchIndexId)
    {
        return dispatchIndexMapper.selectDispatchIndexByDispatchIndexId(dispatchIndexId);
    }

    /**
     * 查询调度首页信息列表
     * 
     * @param dispatchIndex 调度首页信息
     * @return 调度首页信息
     */
    @Override
    public List<DispatchIndex> selectDispatchIndexList(DispatchIndex dispatchIndex)
    {
        return dispatchIndexMapper.selectDispatchIndexList(dispatchIndex);
    }

    /**
     * 新增调度首页信息
     * 
     * @param dispatchIndex 调度首页信息
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchIndex(DispatchIndex dispatchIndex)
    {
        return dispatchIndexMapper.insertDispatchIndex(dispatchIndex);
    }

    /**
     * 修改调度首页信息
     * 
     * @param dispatchIndex 调度首页信息
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchIndex(DispatchIndex dispatchIndex)
    {
        return dispatchIndexMapper.updateDispatchIndex(dispatchIndex);
    }

    /**
     * 批量删除调度首页信息
     * 
     * @param dispatchIndexIds 需要删除的调度首页信息主键
     * @return 结果
     */
    @Override
    public int deleteDispatchIndexByDispatchIndexIds(Long[] dispatchIndexIds)
    {
        return dispatchIndexMapper.deleteDispatchIndexByDispatchIndexIds(dispatchIndexIds);
    }

    /**
     * 删除调度首页信息信息
     * 
     * @param dispatchIndexId 调度首页信息主键
     * @return 结果
     */
    @Override
    public int deleteDispatchIndexByDispatchIndexId(Long dispatchIndexId)
    {
        return dispatchIndexMapper.deleteDispatchIndexByDispatchIndexId(dispatchIndexId);
    }
}
